package io.gitee.yth.design.pattern.test.core.pattern.behavioral.mediator;

/**
 * @author yth
 * @since 2023-05-01-16:22
 */
public abstract class Widget {

    protected ActionListener actionListener;

    public Widget(ActionListener actionListener) {
        this.actionListener = actionListener;
    }

    protected final void changed(Object... args) {
        if (actionListener != null) {
            actionListener.onActionPerformed(this, args);
        }
    }

}
